<?php
class UpdateModel{
    public function show($mid){
        $a=MysqlDb::getInstance();
        $sql='select m.id,t1.team as tn1,m.teamone,m.score,t2.team as tn2,m.teamtwo from `matchs` as m
                LEFT JOIN team as t1 ON m.teamone=t1.id
                LEFT JOIN team as t2 ON m.teamtwo=t2.id where m.id='.$mid;
        return $a->query($sql);        
    }

    public function Steam(){
        $a=MysqlDb::getInstance();
        $sql='select * from team';
        return $a->query($sql);
    }
    

    public function Update($str,$mid){
        $a=MysqlDb::getInstance();
        $sql='update matchs set '.trim($str,',').' where id='.$mid;
        var_dump($sql);
        $a->exec($sql);
    }
    
}









?>